Jump to content

Recommended Posts

Posted (edited)

Hello Guys,

 

i have a Problem with my Textures. The confussing Situation for me is, that my Copper has Texture but the other Ores not.

grafikfehler.png.beafac6ef120fa520ab260c3c94226d9.png

I have a 2 Classes for my Ores. BlockOre and BlockOreHard.

 

BlockOre

public class BlockOre extends BlockBase {

	private String oreName;

	public BlockOre(String name, String oreName) {
		super(Material.ROCK, name);

		this.oreName = oreName;

		setHardness(3f);
		setResistance(5f);
	}

	public void initOreDict() {
		OreDictionary.registerOre(oreName, this);
	}

	@Override
	public BlockOre setCreativeTab(CreativeTabs tab) {
		super.setCreativeTab(tab);
		return this;
	}

}

BlockOreHard

public class BlockOreHard extends BlockBase {

	private String oreName;

	public BlockOreHard(String name, String oreName) {
		super(Material.ROCK, name);

		this.oreName = oreName;

		setHardness(5f);
		setResistance(5f);
	}

	public void initOreDict() {
		OreDictionary.registerOre(oreName, this);
	}

	@Override
	public BlockOreHard setCreativeTab(CreativeTabs tab) {
		super.setCreativeTab(tab);
		return this;
	}

}

ModBlocks:

public class ModBlocks {

	public static BlockOre oreCopper = new BlockOre("ore_copper", "oreCopper");
	public static BlockOre oreAlumin = new BlockOre("ore_alumin", "oreAlumin");
	
	public static BlockOreHard oreRubin = new BlockOreHard("ore_rubin", "oreRubin");
	
	public static BlockWood woodfloor = new BlockWood("woodfloor", "woodfloor");

	public static void register(IForgeRegistry<Block> registry) {
		registry.registerAll(
				oreCopper,
				oreAlumin,
				oreRubin,
				woodfloor
				
		);

	}

	public static void registerItemBlocks(IForgeRegistry<Item> registry) {
		registry.registerAll(
				oreCopper.createItemBlock(),
				oreAlumin.createItemBlock(),
				oreRubin.createItemBlock(),
				woodfloor.createItemBlock()
		);
	}

	public static void registerModels() {
		oreCopper.registerItemModel(Item.getItemFromBlock(oreCopper));
		oreAlumin.registerItemModel(Item.getItemFromBlock(oreAlumin));
		oreRubin.registerItemModel(Item.getItemFromBlock(oreRubin));
		woodfloor.registerItemModel(Item.getItemFromBlock(woodfloor));

	}

}

In my classes and my Console i have no Error and no Message that the Texture dont can be loaded. The Files are in the same Ressource Folder then my Copper.

I hope you have any Idea why my Graphics dont load. I have try many things and find no Solution. I excuse for my bad English, i´m a German Guy and in my School, i have not learned many English.

Edited by DerWaldfried
Posted
9 minutes ago, diesieben07 said:

Show where you call the methods in the ModBlocks class (probably your main mod class and your sided proxy classes).

Show BlockBase.

I hope you mean that i show this here ^^ Well i have searched on the classes over 4 Days and dont have found a error or something. Here now my Base, MainClass and my Network Classes.....

 

BlockBase

public class BlockBase extends Block {

	protected String name;

	public BlockBase(Material material, String name) {
		super(material);

		this.name = name;

		setUnlocalizedName(name);
		setRegistryName(name);

		setCreativeTab(FriedAdventure.creativeTab);
	}

	public void registerItemModel(Item item) {
		FriedAdventure.proxy.registerItemRenderer(item, 0, name);
	}

	@Override
	public BlockBase setCreativeTab(CreativeTabs tab) {
		super.setCreativeTab(tab);
		return this;
	}

	public Item createItemBlock() {
		return new ItemBlock(this).setRegistryName(getRegistryName());
	}

}

CommonProxy

public class CommonProxy {

	public void registerItemRenderer(Item item, int meta, String id) {

	}

	public String localize(String unlocalized, Object... args) {
		return I18n.translateToLocalFormatted(unlocalized, args);
	}

	public void registerRenderers() {
	}

}

ClientProxy

public class ClientProxy extends CommonProxy {

	@Override
	public void registerItemRenderer(Item item, int meta, String id) {
		ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(FriedAdventure.modId + ":" + id, "inventory"));
	}

	@Override
	public String localize(String unlocalized, Object... args) {
		return I18n.format(unlocalized, args);
	}

	@Override
	public void registerRenderers() {
		
	}
}

MainClass

@Mod(modid = FriedAdventure.modId, name = FriedAdventure.name, version = FriedAdventure.version)
public class FriedAdventure {

	public static final String modId = "friedadventure";
	public static final String name = "FriedAdventure";
	public static final String version = "1.0.0";

	@Mod.Instance(modId)
	public static FriedAdventure instance;

	@SidedProxy(serverSide = "de.waldfried.friedadventure.proxy.CommonProxy", clientSide = "de.waldfried.friedadventure.proxy.ClientProxy")
	public static CommonProxy proxy;

	public static final FrieAdventTab creativeTab = new FrieAdventTab();

	public static SimpleNetworkWrapper network;

	@Mod.EventHandler
	public void preInit(FMLPreInitializationEvent event) {
		proxy.registerRenderers();
		GameRegistry.registerWorldGenerator(new ModWorldGen(), 3);
	}

	@Mod.EventHandler
	public void init(FMLInitializationEvent event) {
		ModRecipes.init();
	}

	@Mod.EventHandler
	public void postInit(FMLPostInitializationEvent event) {

	}

	@Mod.EventBusSubscriber
	public static class RegsitrationHandler {

		@SubscribeEvent
		public static void registerItems(RegistryEvent.Register<Item> event) {
			ModItems.register(event.getRegistry());
			ModBlocks.registerItemBlocks(event.getRegistry());
		}

		@SubscribeEvent
		public static void registerBlocks(RegistryEvent.Register<Block> event) {
			ModBlocks.register(event.getRegistry());
		}

		@SubscribeEvent
		public static void registerModels(ModelRegistryEvent event) {
			ModItems.registerModels();
			ModBlocks.registerModels();
		}

	}

}

 

When you mean to view by my self , then sorry ^^ Well, my code is not the cleanest Solution but i hope you can tell me a Solution.

Posted

Well,

 

i now have Activate the Expanded Error Logging from Forge and become this Message:

Quote

[11:27:24] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[11:27:24] [main/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[11:27:24] [main/ERROR] [TEXTURE ERRORS]: ==================================================
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:   DOMAIN friedadventure
[11:27:24] [main/ERROR] [TEXTURE ERRORS]: --------------------------------------------------
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:   domain friedadventure is missing 0 textures
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:     domain friedadventure has 1 location:
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:       mod friedadventure resources at C:\Users\patri\Documents\FriedAdventure\bin
[11:27:24] [main/ERROR] [TEXTURE ERRORS]: -------------------------
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:     The following other errors were reported for domain friedadventure:
[11:27:24] [main/ERROR] [TEXTURE ERRORS]: -------------------------
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:     Problem: broken aspect ratio and not an animation
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:       textures/blocks/ore_alumin.png
[11:27:24] [main/ERROR] [TEXTURE ERRORS]:       textures/blocks/ore_rubin.png
[11:27:24] [main/ERROR] [TEXTURE ERRORS]: ==================================================
[11:27:24] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

But this give me no Sense. it is 1:1 the same Json like Copper only a other Texture oO Alumin:

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
            "all": "friedadventure:blocks/ore_alumin"
        }
    },
    "variants": {
        "normal": {
            "model": "cube_all"
        },
        "inventory": {
            "model": "cube_all"
        }
    }
}

Copper:

{
	"forge_marker": 1,
	"defaults": {
		"textures": {
			"all": "friedadventure:blocks/ore_copper"
		}
	},
	"variants": {
		"normal": {
			"model": "cube_all"
		},
		"inventory": {
			"model": "cube_all"
		}
	}
}

Or come the error from

Quote

    "forge_marker": 1,

this ? I mean i dont give any Animation Point and i dont give any rotation informations oO

Posted
1 minute ago, DerWaldfried said:

This has worked.... Wow... Sry oO What a simple Solution and I do not come to this simple solution . Thanks a lot. Now it works.

If you solved this problem, please insert a [SOLVED] in the title so that people with similar problem may be able to fix it too :)

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



×
×
  • Create New...

Important Information

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