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.

{SOLVED} [1.12.2] Game crash when right-click on earhBlock with Seeds

Featured Replies

Posted

I everybody,

 

I'm making a mod and I'm following shadowfacts' tutorial.

 

Today I wanted to da a simple crop, so following this tutorial I made my corn crops.

 

Everythink work except for one thing. When I righ-click on a block with my seeds the game crash.

 

My project: https://github.com/IlTosaerba/Minecraft-1.12.2-WLLC-Mod/tree/IlTosaerba-WLLC-1.12.2]-Mod   (The "resource/assets" has been exploded 'cause GitHub don't permit the upload of +100 files and I don't understand how to create folders and so on)

 

Crash Error: 

Reveal hidden contents

 

Edited by IlTosaerba

  On 3/11/2018 at 4:57 PM, diesieben07 said:
  • Blocks.CROP_CORN is null at this point. You cannot pass null for that parameter though.

@diesieben07 We should have this problem in the common problems list. I vaguely recall trying to ping you about it before.

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.

  On 3/11/2018 at 5:36 PM, diesieben07 said:

How do you want to add it? "Don't pass null to things that should not be null"?

This issue is only ever a problem "when someone is creating crops" (90%+). Usually it's someone passing an item to a block constructor, but only about 60-40.

I'd write it as...

"Do not pass items to block constructors, if passing blocks to items, insure blocks are initialized first. This is a very common issue when making crops and seeds. Use the debugger to verify your references are not null."

Or

"When passing block and item references to constructors, insure correct order of operations. Use the debugger to verify your references are not null. Blocks should be initialized before items."

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.

  On 3/11/2018 at 6:02 PM, diesieben07 said:

The specific issue you are describing is solved if you comply with the recommended approach of creating your blocks and items in the registry events (block registration fires first).

Yes, I agree. But even so I still see people doing this wrong. Like I said, I've seen people pass their item reference to their block (heck I once saw someone do both: item ref to the block and the block ref to the item!). Literally every time I see a thread with the word "crop" or "seeds" in the title I know what the problem is, and it's this problem. The registry events have (somehow) not made this common issue go away.

Edited by Draco18s

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

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.