Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

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.

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

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

  • Author

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

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.

  • Author
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

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.

  • Author

So "deprecated" does not mean "it'll be removed soon, please use a new method instead" ?

 

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.