Jump to content

Recommended Posts

Posted

Error message:

 

Spoiler

[13:29:26] [Client thread/WARN]: Failed to load texture: walkingdeadmod:textures/entities/civilian/civilian10.png
java.io.FileNotFoundException: walkingdeadmod:textures/entities/civilian/civilian10.png
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:34) ~[SimpleTexture.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:67) [TextureManager.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:42) [TextureManager.class:?]
    at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:130) [Render.class:?]
    at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:123) [Render.class:?]
    at net.minecraft.client.renderer.entity.RenderLivingBase.renderModel(RenderLivingBase.java:248) [RenderLivingBase.class:?]
    at net.minecraft.client.renderer.entity.RenderLivingBase.doRender(RenderLivingBase.java:180) [RenderLivingBase.class:?]
    at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:51) [RenderLiving.class:?]
    at net.minecraft.client.renderer.entity.RenderLiving.doRender(RenderLiving.java:16) [RenderLiving.class:?]
    at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:388) [RenderManager.class:?]
    at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:372) [RenderManager.class:?]
    at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:646) [RenderGlobal.class:?]
    at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1389) [EntityRenderer.class:?]
    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1303) [EntityRenderer.class:?]
    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1106) [EntityRenderer.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1140) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:407) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]

getentity method:

 

	@SideOnly(Side.CLIENT)
	public void registerRenderers() {
		RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new Civilian.ModelNew(), 0) {
			protected ResourceLocation getEntityTexture(Entity par1Entity) {
			int id = (int) (par1Entity.getUniqueID().getLeastSignificantBits()& 3);
			int id2 = (int) (par1Entity.getUniqueID().getMostSignificantBits() & 3);		
			
			
				
			Twister.initialize_generator(2378 + id);
			
			int ch = 0;
			
			for(int i=Math.abs(id + id2)%64; i>=0; i--) {
				ch = Twister.extract_number();
			}
			
			ch = (ch + id) % 11;
			
			while(ch == 0) {
			ch =((ch + id + 1) % 11);
			}
			
			return new ResourceLocation("walkingdeadmod", "textures/entities/civilian/Civilian" + ch + ".png");
			
			
			}
		};
		RenderingRegistry.registerEntityRenderingHandler(Civilian.EntityCivilian.class, customRender);

	}





textures are saved at: src/main/resources/assets/walkingdeadmod/textures/entities/civilian/Civilian10.png

 

the number is betweer 1 and 10.
 

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.