Jump to content

Recommended Posts

Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
42 minutes ago, iSyriux said:

Also, what do I return instead of null?

...something that isn't null!?

 

42 minutes ago, iSyriux said:

What does having different lines of code doing the same thing have to do with the armour not rendering correctly?

Nothing, its just completely useless redundant code that makes it clear that you have no idea what the fuck you're doing.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Obviously. The method expects something to be returned. It even tells you what it expects.

And you're not giving it that thing.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Alright, I just made a read on a java manual

 

image.png.0c3a7db2b8c12fc93ba97bbbe77feb8c.png

And it shows a code example of it returning the thing in the arrow brackets, however it seems to be showing an error.

image.png.6c4875a0a2c838a255bd2ca598e23f26.png

Posted

That's not how generics work.

This works:

public List<Article> {
  return articles;
}

because of this (not shown):

private List<Article> articles = new List<Article>();

Not because this:

public List<FooBar> {
  return foobar; //return "foobar" because FooBar is inside <>!
}

The "thing inside the angle brackets" is a generic. List<T> is a list of things that are Type T. What is T? Whatever you want it to be.
<A extends ModelBiped> is a Type A (and extends ModelBiped). You need to return some object that is of Type A.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)

Ah, I see. I've returned _default and it doesn't give an error anymore. However, the model is still not rendering correctly.

Edited by iSyriux
Posted

Well...of course not, the default chestplate model doesn't have the layer you want to add.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)
1 hour ago, iSyriux said:

So how do you add the layer?

On 9/6/2020 at 12:39 AM, Danebi said:

You have to return your armor model.

Have you done this?

Edited by Danebi
Posted
On 9/5/2020 at 5:41 PM, Draco18s said:

<A extends ModelBiped> is a Type A (and extends ModelBiped). You need to return some object that is of Type A.

 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
18 minutes ago, iSyriux said:

If I return my armour model it gives an error, so the only thing I can return is _default image.png.634beb19b0bc6da771e2773853bbcbee.png

Show the method after you return your armor model and the class of the model.

Posted
29 minutes ago, iSyriux said:

I don't know what is type A. I Apologise if my questions seem redundant or moronic, I am quite new to minecraft modding.

It's a generic type. The code tells you what matches it.

<A extends ModelBiped>

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.