1

Mod texture don't work

pieterx12's Avatar pieterx129/20/14 2:56 pm
9/24/2014 4:30 pm
kristinnvikar's Avatar kristinnvikar
Hi, I'm programming a mod for minecraft of course but when i create a block the textures won't show. Can someone help me ??
Thanks a lot
Posted by pieterx12's Avatar
pieterx12
Level 8 : Apprentice Miner
1

Create an account or sign in to comment.

10

1
09/24/2014 4:30 pm
Level 52 : Grandmaster Programmer
kristinnvikar
kristinnvikar's Avatar
in the main class instead of Basic make it basic and change the folder name to lower case basic (i had the same problem first with my mod)
1
09/21/2014 5:21 am
Level 8 : Apprentice Miner
pieterx12
pieterx12's Avatar
It still doesn't work
1
09/21/2014 5:18 am
Level 8 : Apprentice Miner
pieterx12
pieterx12's Avatar
Like this ?? package tutorial.basic.block;

import tutorial.basic.basic;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

public class MeteorBlock extends Block{

public MeteorBlock(int i, Material p_i45394_1_) {
super(p_i45394_1_);
super.setCreativeTab(CreativeTabs.tabBlock);
this.setHardness(5F);
this.setResistance(5.0F);
this.setLightLevel(0.5F);


}



}
1
09/21/2014 5:16 am
Level 67 : High Grandmaster Toast
sigurd4
sigurd4's Avatar
Btw, why do you have the set light level stuff in the set creative tab function and not in the constructor?? That makes no sense and will make it impossible to appear in a creative tab. At least put a super.setCreativeTab(string) there if you absolutely need to have them there.
1
09/21/2014 5:10 am
Level 67 : High Grandmaster Toast
sigurd4
sigurd4's Avatar
First of all, the string where you specify texture should be all lowercase. Just look at the vanilla code. If that doesnt work, i'm pretty sure you have typed in the wrong texture name or the wrong modid. Also, have you refreshed your workspace? And make sure the assets folder is in your build path.
1
09/21/2014 4:19 am
Level 8 : Apprentice Miner
pieterx12
pieterx12's Avatar
Ok here is my code package tutorial.basic;



import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
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.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import tutorial.basic.block.MeteorBlock;;
@Mod(modid="Basic", name="Basic", version="1.0.0")

public class Basic {
public static Block MeteorBlock = new MeteorBlock(3000, Material.rock).setBlockName("MeteorBlock").setBlockTextureName("Basic:MeteorBlock");
// The instance of your mod that Forge uses.
@Instance("Basic")
public static Basic instance;

// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide="tutorial.basic.client.ClientProxy", serverSide="tutorial.basic.CommonProxy")
public static CommonProxy proxy;


@EventHandler
public void load(FMLInitializationEvent event) {
proxy.registerRenderers();
ItemStack dirt = new ItemStack(Blocks.dirt);
GameRegistry.addRecipe(new ItemStack(Blocks.dirt), new Object[]{
"yyy" ,
"yxy" ,
"yyy" ,
'y', Blocks.sponge, 'x', Blocks.bedrock, 'z', Items.arrow
});
GameRegistry.addSmelting(Blocks.bedrock, new ItemStack(Blocks.obsidian), 20F);

}

@EventHandler
public void postInit(FMLPostInitializationEvent event) {
// Stub Method
}
public Basic(){
GameRegistry.registerBlock(MeteorBlock, "MeteorBlock");

}
}
and my MeteorBlock.java package tutorial.basic.block;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

public class MeteorBlock extends Block{

public MeteorBlock(int i, Material p_i45394_1_) {
super(p_i45394_1_);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setHardness(5F);
this.setResistance(5.0F);
this.setLightLevel(0.5F);
}

}
1
09/20/2014 7:54 pm
Level 52 : Grandmaster Programmer
kristinnvikar
kristinnvikar's Avatar
1
09/20/2014 4:10 pm
Level 25 : Expert Network
4377699683
4377699683's Avatar
Well we will need to see the code.
Just post the code where you set the texture name/file.
1
09/20/2014 3:12 pm
Level 33 : Artisan Engineer
RoboShadow
RoboShadow's Avatar
Sure, someone can help you.
1
09/20/2014 3:09 pm
Level 38 : Artisan Creeper Hugger
Tamacraft123
Tamacraft123's Avatar
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome