Jump to content

Recommended Posts

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.

Posted

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-

Posted

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-

Posted

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • UPDATE: this seems to be an Arch-specific issue. Switching to Ubuntu server fixed EVERYTHING.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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