Jump to content

Recommended Posts

Posted (edited)

i can imagine that it is some stupid error of mine like the last few posts from me ... but i guess i will ask anyways:

basicly what i am trying to do is rendering a json file on the player .. which works perfectly fine but i get the missing texture instead of the ones i made...
(and i dont even get any kind of error .. like a texture loading error or something like that)
 

the class i overwrite the normal player render with:

  Reveal hidden contents

and my json:
 

  Reveal hidden contents

 

edit: btw this is how it looks like:        unknown.png

Edited by Oscarita25
added picture
Posted (edited)
  On 2/11/2019 at 1:18 PM, diesieben07 said:

What do these two methods do?

Expand  

those are custom classes that i got from some posts from persons who tried this wait i will send 'em:

 

  Reveal hidden contents
  Reveal hidden contents

 edit: also cadiboo helped me greatly with this :=

Edited by Oscarita25
just crediting cadiboo
Posted (edited)
  On 2/11/2019 at 1:41 PM, Oscarita25 said:

 i am not sure how would i do that? 

Expand  

caugh ... caugh .....

oops.. forgot this in my whole code:
 

	@SubscribeEvent
	public static void onModelBakeEvent(final ModelBakeEvent event) {
		final IRegistry<ModelResourceLocation, IBakedModel> registry = event.getModelRegistry();

		injectModels(registry);
	}

 

thanks
@diesieben07

edit: wierd.. it actually changed nothing ?

Edited by Oscarita25
wohoo it still consists
Posted (edited)
  On 2/11/2019 at 2:37 PM, Meldexun said:

Yeah i was too fast and saw it right after clicking submit reply... Maybe try if vanilla minecraft textures are working.

Expand  

interesting .. i changed my textures to :
        "0": "blocks/iron_block",
        "1": "blocks/iron_block",
        "particle": "blocks/iron_block"
nothing changed the textures are still not showing :0

 

edit THEY DO SHOW !! ... it works with normal textures! (didn't reload the json before)

Edited by Oscarita25
Posted
  On 2/11/2019 at 2:42 PM, Oscarita25 said:

interesting .. i changed my textures to :
        "0": "blocks/iron_block",
        "1": "blocks/iron_block",
        "particle": "blocks/iron_block"
nothing changed the textures are still not showing :0

Expand  

I just tried your model as a regular item and it's showing perfectly. So the json seems fine.

Posted
  On 2/11/2019 at 2:51 PM, Meldexun said:

I mean when i load your model for my item it shows with texture. So something in your code seems wrong.

Expand  

i am actually not sure if it is really my code because if i use normal minecraft textures it shows (i edited what i said before)

Posted
  On 2/11/2019 at 3:02 PM, Oscarita25 said:

i am actually not sure if it is really my code because if i use normal minecraft textures it shows (i edited what i said before)

Expand  

actually it only doesn't work for the textures that has not been loaded by a item or anything like that before
... like i can load my textures i use for ANY item in my mod but not the ones i want to use for the model

Posted

The textures just haven't been loaded.  I don't know the exact procedure here, but you'd probably need to load them in during the TextureStitchEvent.

  • Like 1
Posted
  On 2/11/2019 at 6:41 PM, Corey said:

The textures just haven't been loaded.  I don't know the exact procedure here, but you'd probably need to load them in during the TextureStitchEvent.

Expand  

i figured that much myself! also thanks for pointing out the Event because thats what i've been searching for the last half hour XD

  • Like 1
Posted

@Corey thank you very much this was the solution! :D

btw this is the code i used to register the textures! 

	
	@SubscribeEvent
	public static void TextureStiching(TextureStitchEvent.Pre event) {
			TextureMap map = event.getMap();
			map.registerSprite(new ResourceLocation(Reference.MOD_ID,"tail/tailskincolour"));
			map.registerSprite(new ResourceLocation(Reference.MOD_ID,"tail/tailhaircolour"));
	}

 

  • Like 2

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.