Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.10]Textures not showing up.


AimeryCM
 Share

Recommended Posts

When i launch the client from eclipse, the textures don't show up. I am not sure why. Can someone please help me?

@Mod(modid = MainClass.modid, name = MainClass.name, version = MainClass.version)
public class MainClass {
@SidedProxy(clientSide = "com.FirstMod.MainPackage.ClientProxy", serverSide = "com.FirstMod.MainPackage.CommonProxy")
public static CommonProxy proxy;

public static final String modid = "firstmod";
public static final String version = "1";
public static final String name = "FirstMod";

//CreativeTab
public static CreativeTabs modTab = new CreativeTabs("firstmodTab"){
	public Item getTabIconItem() {
		return bloodstone;
	}
};

@Instance(modid)
public static MainClass instance;

//ArmorIDs
public static int bloodstoneHelmetID;
public static int bloodstoneChestplateID;
public static int bloodstoneLeggingsID;
public static int bloodstoneBootsID;
public static int platinumHelmetID;
public static int platinumChestplateID;
public static int platinumLeggingsID;
public static int platinumBootsID;

//Tool Material
public static ToolMaterial BloodstoneMaterial = EnumHelper.addToolMaterial("BloodstoneMaterial", 2, 640, 5.0F, 2.0F, 20);
public static ToolMaterial PlatinumMaterial = EnumHelper.addToolMaterial("PlatinumMaterial", 2, 960, 6.5F, 1.5F, 25);

//Armor Material
public static ArmorMaterial BloodstoneArmorMaterial = EnumHelper.addArmorMaterial("BloodstoneArmorMaterial", 25, new int[] {2, 7, 5, 2}, 25);
public static ArmorMaterial PlatinumArmorMaterial = EnumHelper.addArmorMaterial("PlatinumArmorMaterial", 23, new int[] {3, 6, 6, 2}, 25);

//blocks
public static net.minecraft.block.Block blockBloodstoneOre = new blockBloodstoneOreClass(Material.rock).setBlockName("BloodstoneOre").setCreativeTab(modTab);
public static net.minecraft.block.Block blockBloodstone = new blockBloodstoneClass(Material.rock).setBlockName("BloodstoneBlock").setCreativeTab(modTab);
public static net.minecraft.block.Block blockPlatinumOre = new blockPlatinumOreClass(Material.rock).setBlockName("PlatinumOre").setCreativeTab(modTab);
public static net.minecraft.block.Block blockPlatinum = new blockPlatinumClass(Material.rock).setBlockName("PlatinumBlock").setCreativeTab(modTab);
public static net.minecraft.block.Block blockPlatinumFurnaceActive = new blockPlatinumFurnaceClass(true).setBlockName("PlatinumFurnaceActive").setHardness(4.0F).setLightLevel(0.7F);
public static net.minecraft.block.Block blockPlatinumFurnaceIdle = new blockPlatinumFurnaceClass(false).setBlockName("PlatinumFurnaceIdle").setHardness(4.0F).setCreativeTab(modTab);

//Items
public static Item bloodstone = new Item().setUnlocalizedName("bloodstone").setCreativeTab(modTab).setTextureName(modid + ":" + "bloodstone").setMaxStackSize(64);
public static Item platinumIngot = new Item().setUnlocalizedName("platinumIngot").setCreativeTab(modTab).setTextureName(modid + ":ingotPlatinum").setMaxStackSize(64);
public static Item waterCrystal = new Item().setUnlocalizedName("WaterCrystal").setCreativeTab(modTab).setTextureName(modid + ":WaterCrystal").setMaxStackSize(64);
public static Item fireCrystal = new Item().setUnlocalizedName("FireCrystal").setCreativeTab(modTab).setTextureName(modid + ":LavaCrystal").setMaxStackSize(64);
public static Item airCrystal = new Item().setUnlocalizedName("AirCrystal").setCreativeTab(modTab).setTextureName(modid + ":AirCrystal").setMaxStackSize(64);
public static Item earthCrystal = new Item().setUnlocalizedName("EarthCrystal").setCreativeTab(modTab).setTextureName(modid + ":EarthCrystal").setMaxStackSize(64);

//Food
public static Item chocolate = new foodClass(3, 0.4F, false).setUnlocalizedName("Chocolate").setCreativeTab(modTab).setTextureName(modid + ":chocolate");
public static net.minecraft.block.Block chocolateCake = new chocolateCakeClass(Material.cake).setBlockName("ChocolateCake").setBlockTextureName(modid + ":ChocolateCake");
public static Item chocolateCakeItem = new ItemReed(chocolateCake).setCreativeTab(modTab).setUnlocalizedName("ChocolateCakeItem").setTextureName(modid + ":ChocolateCake");

//Tools
public static Item bloodstoneAxe = new bloodstoneAxeClass(BloodstoneMaterial).setUnlocalizedName("BloodstoneAxe").setCreativeTab(modTab).setTextureName(modid + ":hatchetBloodstone");
public static Item bloodstoneShovel = new bloodstoneShovelClass(BloodstoneMaterial).setUnlocalizedName("BloodstoneShovel").setCreativeTab(modTab).setTextureName(modid + ":shovelBloodstone");
public static Item bloodstonePickaxe = new bloodstonePickaxeClass(BloodstoneMaterial).setUnlocalizedName("BloodstonePickaxe").setCreativeTab(modTab).setTextureName(modid + ":pickaxeBloodstone");
public static Item bloodstoneHoe = new bloodstoneHoeClass(BloodstoneMaterial).setUnlocalizedName("BloodstoneHoe").setCreativeTab(modTab).setTextureName(modid + ":hoeBloodstone");
public static Item bloodstoneSword = new bloodstoneSwordClass(BloodstoneMaterial).setUnlocalizedName("BloodstoneSword").setCreativeTab(modTab).setTextureName(modid + ":swordBloodstone");
public static Item platinumAxe = new platinumAxeClass(PlatinumMaterial).setUnlocalizedName("PlatinumAxe").setCreativeTab(modTab).setTextureName(modid + ":hatchetPlatinum");
public static Item platinumShovel = new platinumShovelClass(PlatinumMaterial).setUnlocalizedName("PlatinumShovel").setCreativeTab(modTab).setTextureName(modid + ":shovelPlatinum");
public static Item platinumPickaxe = new platinumPickaxeClass(PlatinumMaterial).setUnlocalizedName("PlatinumPickaxe").setCreativeTab(modTab).setTextureName(modid + ":pickaxePlatinum");
public static Item platinumHoe = new platinumHoeClass(PlatinumMaterial).setUnlocalizedName("PlatinumHoe").setCreativeTab(modTab).setTextureName(modid + ":hoePlatinum");
public static Item platinumSword = new platinumSwordClass(PlatinumMaterial).setUnlocalizedName("PlatinumSword").setCreativeTab(modTab).setTextureName(modid + ":swordPlatinum");


//Armor
public static Item bloodstoneHelmet = new bloodstoneArmor(BloodstoneArmorMaterial, bloodstoneHelmetID, 0).setUnlocalizedName("BloodstoneHelmet").setCreativeTab(modTab);
public static Item bloodstoneChestplate = new bloodstoneArmor(BloodstoneArmorMaterial, bloodstoneChestplateID, 1).setUnlocalizedName("BloodstoneChestplate").setCreativeTab(modTab);
public static Item bloodstoneLeggings = new bloodstoneArmor(BloodstoneArmorMaterial, bloodstoneLeggingsID, 2).setUnlocalizedName("BloodstoneLeggings").setCreativeTab(modTab);
public static Item bloodstoneBoots = new bloodstoneArmor(BloodstoneArmorMaterial, bloodstoneBootsID, 3).setUnlocalizedName("BloodstoneBoots").setCreativeTab(modTab);
public static Item platinumHelmet = new platinumArmorClass(PlatinumArmorMaterial, platinumHelmetID, 0).setUnlocalizedName("PlatinumHelmet").setCreativeTab(modTab);
public static Item platinumChestplate = new platinumArmorClass(PlatinumArmorMaterial, platinumChestplateID, 1).setUnlocalizedName("PlatinumChestplate").setCreativeTab(modTab);
public static Item platinumLeggings = new platinumArmorClass(PlatinumArmorMaterial, platinumLeggingsID, 2).setUnlocalizedName("PlatinumLeggings").setCreativeTab(modTab);
public static Item platinumBoots = new platinumArmorClass(PlatinumArmorMaterial, platinumBootsID, 3).setUnlocalizedName("PlatinumBoots").setCreativeTab(modTab);

//Generation
public static bloodstoneGenerationClass bloodstoneWorldGen = new bloodstoneGenerationClass();

public static final int guiIdPlatinumFurnace = 0;

@EventHandler
public void load(FMLInitializationEvent g){
	NetworkRegistry.INSTANCE.registerGuiHandler(MainClass.instance, new GuiHandler());
}

@EventHandler
    public void init(FMLPreInitializationEvent e){

	//Block Registry
	GameRegistry.registerBlock(blockBloodstoneOre, "BloodstoneOre");
	GameRegistry.registerBlock(blockBloodstone, "BloodstoneBlock");
	GameRegistry.registerBlock(blockPlatinumOre, "PlatinumOre");
	GameRegistry.registerBlock(blockPlatinum, "PlatinumBlock");
	GameRegistry.registerBlock(blockPlatinumFurnaceActive, "PlatinumFurnaceActive");
	GameRegistry.registerBlock(blockPlatinumFurnaceIdle, "PlatinumFurnaceIdle");

	//Item Registry
	GameRegistry.registerItem(bloodstone, "Bloodstone");
	GameRegistry.registerItem(platinumIngot, "platinumIngot");
	GameRegistry.registerItem(waterCrystal, "WaterCrystal");
	GameRegistry.registerItem(fireCrystal, "FireCrystal");
	GameRegistry.registerItem(airCrystal, "AirCrystal");
	GameRegistry.registerItem(earthCrystal, "EarthCrystal");

	//food Registry
	GameRegistry.registerItem(chocolate, "Chocolate");
	GameRegistry.registerBlock(chocolateCake, "ChocolateCake");
	GameRegistry.registerItem(chocolateCakeItem, "ChocolateCakeItem");

	//Tool Registry
	GameRegistry.registerItem(bloodstoneAxe, "BloodstoneAxe");
	GameRegistry.registerItem(bloodstoneShovel, "BloodstoneShovel");
	GameRegistry.registerItem(bloodstoneHoe, "BloodstoneHoe");
	GameRegistry.registerItem(bloodstonePickaxe, "BloodstonePickaxe");
	GameRegistry.registerItem(bloodstoneSword, "BloodstoneSword");
	GameRegistry.registerItem(platinumAxe, "PlatinumAxe");
	GameRegistry.registerItem(platinumShovel, "PlatinumShovel");
	GameRegistry.registerItem(platinumPickaxe, "PlatinumPickaxe");
	GameRegistry.registerItem(platinumHoe, "PlatinumHoe");
	GameRegistry.registerItem(platinumSword, "PlatinumSword");

	//Armor Registry
	GameRegistry.registerItem(bloodstoneHelmet, "BloodstoneHelmet");
	GameRegistry.registerItem(bloodstoneChestplate, "BloodstoneChestplate");
	GameRegistry.registerItem(bloodstoneLeggings, "BloodstoneLeggings");
	GameRegistry.registerItem(bloodstoneBoots, "BloodstoneBoots");
	GameRegistry.registerItem(platinumHelmet, "PlatinumHelmet");
	GameRegistry.registerItem(platinumChestplate, "PlatinumChestplate");
	GameRegistry.registerItem(platinumLeggings, "PlatinumLeggings");
	GameRegistry.registerItem(platinumBoots, "PlatinumBoots");

	//Generation Registry
	GameRegistry.registerWorldGenerator(bloodstoneWorldGen, 1);

	//Crafting Registry
	GameRegistry.addRecipe(new ItemStack(bloodstoneAxe, 1), new Object[] {"XX ", "XS ",	" S ", 'X', bloodstone, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(bloodstoneShovel, 1), new Object[] {" X ", " S ", " S ",'X', bloodstone, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(bloodstonePickaxe, 1), new Object[] {"XXX", " S ", " S ",'X', bloodstone, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(bloodstoneHoe, 1), new Object[] {"XX ", " S ", " S ",'X', bloodstone, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(bloodstoneSword, 1), new Object[] {" X ", " X ", " S ",'X', bloodstone, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(bloodstoneHelmet, 1),new Object[] {"XXX","X X", 'X', bloodstone});
	GameRegistry.addRecipe(new ItemStack(bloodstoneChestplate,1),new Object[] {"X X","XXX","XXX", 'X', bloodstone});
	GameRegistry.addRecipe(new ItemStack(bloodstoneLeggings, 1), new Object[] {"XXX","X X","X X", 'X', bloodstone});
	GameRegistry.addRecipe(new ItemStack(bloodstoneBoots, 1), new Object[] {"X X","X X", 'X', bloodstone});
	GameRegistry.addRecipe(new ItemStack(blockBloodstone, 1), new Object[] {"XXX","XXX","XXX", 'X', bloodstone});
	GameRegistry.addRecipe(new ItemStack(platinumAxe, 1), new Object[] {"XX ","XS "," S ", 'X', platinumIngot, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(platinumShovel, 1), new Object[] {" X "," S "," S ", 'X', platinumIngot, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(platinumPickaxe, 1), new Object[] {"XXX"," S "," S ", 'X', platinumIngot,'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(platinumHoe, 1), new Object[] {"XX"," S"," S", 'X', platinumIngot, 'S', Item.itemRegistry.getObject("stick")});
	GameRegistry.addRecipe(new ItemStack(platinumSword, 1), new Object[] {" X "," X "," S ", 'S', Item.itemRegistry.getObject("stick"), 'X', platinumIngot});
	GameRegistry.addRecipe(new ItemStack(platinumHelmet, 1),new Object[] {"XXX","X X", 'X', platinumIngot});
	GameRegistry.addRecipe(new ItemStack(platinumChestplate,1),new Object[] {"X X","XXX","XXX", 'X', platinumIngot});
	GameRegistry.addRecipe(new ItemStack(platinumLeggings, 1), new Object[] {"XXX","X X","X X", 'X', platinumIngot});
	GameRegistry.addRecipe(new ItemStack(platinumBoots, 1), new Object[] {"X X","X X", 'X', platinumIngot});
	GameRegistry.addRecipe(new ItemStack(blockPlatinum, 1), new Object[] {"XXX","XXX","XXX", 'X', platinumIngot});
	GameRegistry.addRecipe(new ItemStack(chocolateCakeItem, 1), new Object[] {"MCM","SES","WWW", 'M', Item.itemRegistry.getObject("milk_bucket"), 'C', chocolate, 'S', Item.itemRegistry.getObject("sugar"), 'E', Item.itemRegistry.getObject("egg"), 'W', Item.itemRegistry.getObject("wheat")});

	//Smelting Registry
	GameRegistry.addSmelting(blockPlatinumOre, new ItemStack(platinumIngot), 2.5F);
	GameRegistry.addSmelting(blockBloodstoneOre, new ItemStack(bloodstone), 2.5F);

	//Ore Registry
	OreDictionary.registerOre("gemBloodstone", new ItemStack(bloodstone));
	OreDictionary.registerOre("orePlatinum", new ItemStack(blockPlatinumOre));
	OreDictionary.registerOre("ingotPlatinum", new ItemStack(platinumIngot));
	OreDictionary.registerOre("oreBloodstone", new ItemStack(blockBloodstoneOre));

	GameRegistry.registerTileEntity(TileEntityPlatinumFurnace.class, "tileEntityPlatinumFurnace");



	LanguageRegistry.instance().addStringLocalization("container.platinumFurnace", "Platinum Furnace");
	}
}

 

If you could just figure out how to do the item bloodstone and the block blockBloodstoneOre i can change the rest. All of the Texture names are correct.

 

public class blockBloodstoneOreClass extends Block{

public blockBloodstoneOreClass(Material p_i45394_1_) {
	super(p_i45394_1_);
	setHardness(4f);
	setResistance(7F);
	setBlockTextureName(MainClass.modid + ":BloodstoneOre");
}

@Override
public Item getItemDropped(int par1, Random random, int par3){
	return MainClass.bloodstone;
}
    public int quantityDropped(Random p_149745_1_)
    {
        return this == MainClass.blockBloodstoneOre ? 1 + p_149745_1_.nextInt(2) : 1;
    }
}

 

There is the code for my blockBloodstoneOre

Link to comment
Share on other sites

Ok. And some code cleanup: Initialize your blocks and items in preinit or init, this will make for cleaner code. Also, I don't use chain configuration. Instead of

new blockPlatinumFurnaceClass(true).setBlockName("PlatinumFurnaceActive").setHardness(4.0F).setLightLevel(0.7F);

I would change it to something like this:

new blockPlatinumFurnaceClass(true, "PlatinumFurnaceActive", 4.0F, 0.7F);

And put all the methods like this:

setBlockName("PlatinumFurnaceActive");
setHardness(4.0F);
setLightLevel(0.7F);

into your constructor, if that make sense. But if you want to still use the bulky chain configuration that's fine.

Link to comment
Share on other sites

When i run the client, in the console this error comes up.

[14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.

[14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================

[14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]:  DOMAIN firstmod

[14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: --------------------------------------------------

[14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]:  domain firstmod is missing 38 textures

[14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]:    domain firstmod is missing a resource manager - it is probably a side-effect of automatic texture processing

[14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------

 

Also, thanks for the tips on cleaning up my code, but i dont mind my code being longer than needed, as long as i can navigate it.

Link to comment
Share on other sites

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

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.