Jump to content

Recommended Posts

Posted

Hey there o/

 

I finally got a Block Model to work in Minecraft (yay).

But now it looks kinda weird.

 

Here a screenshot: 

Spoiler

ca19360184.png

The lightning looks quite a bit off.

Has someone experienced it/knows a fix?

 

-Dj

Posted

Post your block class.

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)

You probably want to put all this on your blocks class:

@Override
@SuppressWarnings("deprecation")
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}

@Override
@SuppressWarnings("deprecation")
public boolean isOpaqueCube(IBlockState state) {
    return false;
}

@Override
@SuppressWarnings("deprecation")
public boolean isFullCube(IBlockState state) {
    return false;
}
Edited by Busti
a typo
  • Like 1

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Posted (edited)

Nice, that works!

Thank you very much!

 

Do you happen to know the not deprecated methods?

I have a feeling it'll bork the hell out when I update to a new Forge version in the future. :D 

 

 

-Dj

Edited by MrDj200
Posted

Please do not use@SuppressWarnings("deprecation")

1 hour ago, MrDj200 said:

Do you happen to know the not deprecated methods?

I have a feeling it'll bork the hell out when I update to a new Forge version in the future. :D

Deprecated means "do not call" not "do not override." It is safe to override these methods, however if you want to know whether or not a given block has these features, you should call IBlockState.<whatever> instead.

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
1 minute ago, Draco18s said:

Deprecated means "do not call"

Yeah, I know ^^. I was told that the probability that Deprecated methods will be removed in the near Future is high, thats why I wanted to know the new variants ^^

 

-Dj

Posted
Just now, MrDj200 said:

Yeah, I know ^^. I was told that the probability that Deprecated methods will be removed in the near Future is high, thats why I wanted to know the new variants ^^

There aren't "new variants"

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

Usually it means "will be removed soon" but Mojang has marked it as deprecated because everything should call the same methods in IBlockState instead (this is the "moved" part of things: the method calls need to point to the new thing).

 

Whether or not they will be removed from the Block class entirely is unclear (and if they are, how would the behaviors be handled?).

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
12 hours ago, Draco18s said:

Post your block class.

Its your 10.000th post, congrats!

I should have removed the @SuppressWarnings("deprecation") annotation.

I use it for convenience, but it might confuse other people.

 

I'll leave it in the post though, so that this conversation still makes sense.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

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.