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

Hi!

 

I am using the 1.6.4 Gradle build for modding but I am unable to successfully load textures. I have tried many random tutorials for the last 3 days but nothing seems to work. Here's my directory structure

 

 

u9vT8zx.png

 

 

And here is the source:

 

TutorialMod.java

 

 

package sourabh.tutorialmod.common;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = TutorialMod.modid, name = "Tutorial Mod", version = "1.0.0 Alpha")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class TutorialMod {

public static final String modid = "tutorialmod";

@Instance(TutorialMod.modid)
public static TutorialMod instance;

@SidedProxy(clientSide = "sourabh.tutorialmod.client.ClientProxy", serverSide = "sourabh.tutorialmod.common.CommonProxy")
public static CommonProxy proxy;

// blocks
public static Block myFirstBlock;

// items
public static Item myFirstItem, myFirstFuel;

@EventHandler
public void load(FMLInitializationEvent event) {
	// blocks init		
	myFirstBlock = (new BlockFirst(538, Material.glass)).setUnlocalizedName("myFirstBlock").setTextureName("blocks");
	LanguageRegistry.addName(myFirstBlock, "My First Block");
	MinecraftForge.setBlockHarvestLevel(myFirstBlock, "pickaxe", 2);
	GameRegistry.registerBlock(myFirstBlock, modid + myFirstBlock.getUnlocalizedName().substring(5));

	// items init
	myFirstItem = (new ItemFirst(900)).setUnlocalizedName("myFirstItem").setTextureName("items");
	LanguageRegistry.addName(myFirstItem, "My First Item");

	myFirstFuel = new ItemFuel(901).setUnlocalizedName("myFuelFirst").setTextureName("items");
	LanguageRegistry.addName(myFirstFuel, "My Fuel Item");

	GameRegistry.registerFuelHandler(new TutorialModFuelHandler());
}

public TutorialMod () {

}

}

 

 

ClientProxy.java

 

 

package sourabh.tutorialmod.client;

import net.minecraftforge.client.MinecraftForgeClient;
import sourabh.tutorialmod.common.CommonProxy;

public class ClientProxy extends CommonProxy {

@Override
public void registerRenderInformation() {

}
}

 

 

CommonProxy.java

 

 

package sourabh.tutorialmod.common;

public class CommonProxy {

public void registerRenderInformation() {

}
}

 

 

BlockFirst.java

 

 

package sourabh.tutorialmod.common;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class BlockFirst extends Block{

public BlockFirst(int id, Material material) {
	super(id, material);
	this.setCreativeTab(CreativeTabs.tabBlock);
	this.setHardness(5.6F);
	this.setResistance(56.34F);
	this.setStepSound(this.soundStoneFootstep);
}

@SideOnly(Side.CLIENT)
public void registerIcons (IconRegister iconRegister) {
	this.blockIcon = iconRegister.registerIcon(TutorialMod.modid + ":" + (this.getUnlocalizedName().substring(5)));
}

}

 

 

I am sorry if I did something really stupid, I am a forge noob and a java beginner.

 

EDIT:

 

I get a warning in console

 

2014-06-22 15:18:22 [WARNING] [Tutorial Mod] Mod Tutorial Mod is missing a pack.mcmeta file, things may not work well

 

You are doing tutorialmod.assets.textures.*, but it should be assets.tutorialmod.textures.*.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.