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



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • How so? A couple of trigonometric functions can't possibly affect performance.
    • Minecraft Version-1.16.5 Forge Version-36.2.0   Crash Log-  https://gist.github.com/keepinitreal247/05669330de1d11fba00d1cbe565f35b1 Debug Log-https://gist.github.com/keepinitreal247/af4304598bd4192be840e8c111af2c81
    • When I try to open forge with java it says unable to install java but I can open java itself just fine. I've tried deleting and redownloading both forge and java but nothing changed. I also tried opening it from my files and from my desktop but it still gave me the same message. I don't think I'm doing anything wrong, I just click on forge and pressed open with java and java opens but only to give me the message saying " unable to install java there are errors in the following switches".   (this is just a picture of what i got from google not my exact message)
    • This is the capability inject and provider for one of my capabilities. All of them are coded the exact same way. public class CapabilityDamageTypes { @CapabilityInject(IDamageTypes.class) public static Capability<IDamageTypes> DAMAGE_TYPES_CAPABILITY = null; public static void register() { CapabilityManager.INSTANCE.register(IDamageTypes.class, new Storage(), new Factory()); } private static class Storage implements Capability.IStorage<IDamageTypes> { @Nullable @Override public INBT writeNBT(Capability<IDamageTypes> capability, IDamageTypes instance, Direction side) { CompoundNBT tag = new CompoundNBT(); tag.putFloat("slash", instance.getSlashDamage()); tag.putFloat("impact", instance.getImpactDamage()); tag.putFloat("puncture", instance.getPunctureDamage()); tag.putFloat("fire", instance.getFireDamage()); tag.putFloat("lightning", instance.getLightningDamage()); tag.putFloat("ice", instance.getIceDamage()); tag.putFloat("dark", instance.getDarkDamage()); tag.putFloat("holy", instance.getHolyDamage()); tag.putFloat("magic", instance.getMagicDamage()); tag.putString("mobDamageType", instance.getMobDamageType()); return tag; } @Override public void readNBT(Capability<IDamageTypes> capability, IDamageTypes instance, Direction side, INBT nbt) { float slash = ((CompoundNBT) nbt).getFloat("slash"); float impact = ((CompoundNBT) nbt).getFloat("impact"); float puncture = ((CompoundNBT) nbt).getFloat("puncture"); float fire = ((CompoundNBT) nbt).getFloat("fire"); float lightning = ((CompoundNBT) nbt).getFloat("lightning"); float ice = ((CompoundNBT) nbt).getFloat("ice"); float dark = ((CompoundNBT) nbt).getFloat("dark"); float holy = ((CompoundNBT) nbt).getFloat("holy"); float magic = ((CompoundNBT) nbt).getFloat("magic"); String mobDamageType = ((CompoundNBT) nbt).getString("mobDamageType"); instance.setSlashDamage(slash); instance.setImpactDamage(impact); instance.setPunctureDamage(puncture); instance.setFireDamage(fire); instance.setLightningDamage(lightning); instance.setIceDamage(ice); instance.setDarkDamage(dark); instance.setHolyDamage(holy); instance.setMagicDamage(magic); instance.setMobDamageType(mobDamageType); } } private static class Factory implements Callable<IDamageTypes> { @Override public IDamageTypes call() throws Exception { return new DamageTypes(0, 0, 0, 0, 0, 0, 0, 0, 0, "IMPACT"); } } } package com.cwjn.hardstuckintegration.Capabilities.DamageTypes; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import net.minecraftforge.common.util.LazyOptional; import javax.annotation.Nonnull; import javax.annotation.Nullable; public class DamageTypesProvider implements ICapabilitySerializable<CompoundNBT> { //private final DamageTypes damage = new DamageTypes(); //private final LazyOptional<IDamageTypes> damageOptional = LazyOptional.of(() -> damage); private DamageTypes damage; private LazyOptional<IDamageTypes> damageOptional; public void invalidate() { damageOptional.invalidate(); } public DamageTypesProvider(float I, float P, float S, float F, float L, float IC, float D, float H, float M, String mobDamageType) { damage = new DamageTypes(I, P, S, F, L, IC, D, H, M, mobDamageType); damageOptional = LazyOptional.of(() -> damage); } @Nonnull @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { return cap == CapabilityDamageTypes.DAMAGE_TYPES_CAPABILITY ? damageOptional.cast() : LazyOptional.empty(); } @Override public CompoundNBT serializeNBT() { if (CapabilityDamageTypes.DAMAGE_TYPES_CAPABILITY == null) { return new CompoundNBT(); } else { return (CompoundNBT) CapabilityDamageTypes.DAMAGE_TYPES_CAPABILITY.writeNBT(damage, null); } } @Override public void deserializeNBT(CompoundNBT nbt) { if (CapabilityDamageTypes.DAMAGE_TYPES_CAPABILITY != null) { CapabilityDamageTypes.DAMAGE_TYPES_CAPABILITY.readNBT(damage, null, nbt); } } }  
    • I got it now I installed the java 16 jdk instead of 8. Now it works thanks!  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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