Jump to content

Recommended Posts

Posted

Ah, yep. There we go.

 

You create and register your blocks before you do items.  So when your try to reference

AEItems.resource_seed

and

AEItems.redstone_sprout

, both of those are null.

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
  On 5/28/2016 at 3:13 PM, Draco18s said:

Ah, yep. There we go.

 

You create and register your blocks before you do items.  So when your try to reference

AEItems.resource_seed

and

AEItems.redstone_sprout

, both of those are null.

 

If I register my items first when I plant the seed my game crashes ...

Posted
  On 5/28/2016 at 3:13 PM, Draco18s said:

Ah, yep. There we go.

 

You create and register your blocks before you do items.  So when your try to reference

AEItems.resource_seed

and

AEItems.redstone_sprout

, both of those are null.

 

If I register my items first when I plant the seed my game crashes ...

Posted
  On 5/28/2016 at 3:32 PM, diesieben07 said:

"It crashes" does not tell anything.

Logs. And new code.

New Common Proxy:

 

  Reveal hidden contents

 

 

Crash Log:

 

  Reveal hidden contents

 

Posted
  On 5/28/2016 at 3:32 PM, diesieben07 said:

"It crashes" does not tell anything.

Logs. And new code.

New Common Proxy:

 

  Reveal hidden contents

 

 

Crash Log:

 

  Reveal hidden contents

 

Posted

AEItems:

 

  Reveal hidden contents

 

 

AEBlocks:

 

  Reveal hidden contents

 

Posted

AEItems:

 

  Reveal hidden contents

 

 

AEBlocks:

 

  Reveal hidden contents

 

Posted

Giggle.

 

Your seed takes your block as a parameter.

 

Your block takes your seed as a parameter.

 

You can't do this. emoticon-00136-giggle.gif

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

Giggle.

 

Your seed takes your block as a parameter.

 

Your block takes your seed as a parameter.

 

You can't do this. emoticon-00136-giggle.gif

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
  On 5/28/2016 at 3:50 PM, Draco18s said:

Giggle.

 

Your seed takes your block as a parameter.

 

Your block takes your seed as a parameter.

 

You can't do this. emoticon-00136-giggle.gif

 

There is any way to do what I want? Using another code?

Posted
  On 5/28/2016 at 3:50 PM, Draco18s said:

Giggle.

 

Your seed takes your block as a parameter.

 

Your block takes your seed as a parameter.

 

You can't do this. emoticon-00136-giggle.gif

 

There is any way to do what I want? Using another code?

Posted

The way to do it is for your item to get registered after your block, but the block's "getSeed" method needs to directly reference

AEItems.test_seed

rather than taking it as a parameter.

 

https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/wildlife/block/BlockCropWinterWheat.java#L35-L37

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

The way to do it is for your item to get registered after your block, but the block's "getSeed" method needs to directly reference

AEItems.test_seed

rather than taking it as a parameter.

 

https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/wildlife/block/BlockCropWinterWheat.java#L35-L37

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
  On 5/28/2016 at 3:55 PM, Draco18s said:

The way to do it is for your item to get registered after your block, but the block's "getSeed" method needs to directly reference

AEItems.test_seed

rather than taking it as a parameter.

 

https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/wildlife/block/BlockCropWinterWheat.java#L35-L37

This is how I set the drops for crops but using this method requires a separate class for every crop ... anyway thanks for help :)

Posted
  On 5/28/2016 at 3:55 PM, Draco18s said:

The way to do it is for your item to get registered after your block, but the block's "getSeed" method needs to directly reference

AEItems.test_seed

rather than taking it as a parameter.

 

https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/wildlife/block/BlockCropWinterWheat.java#L35-L37

This is how I set the drops for crops but using this method requires a separate class for every crop ... anyway thanks for help :)

Posted

You could write some kind of "crop manager" class that would be able to use 1 class again.  But the way you're doing things now will never work: one of the two will always be null when you run the constructor for the other.

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

You could write some kind of "crop manager" class that would be able to use 1 class again.  But the way you're doing things now will never work: one of the two will always be null when you run the constructor for the other.

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
  On 5/27/2016 at 9:13 PM, xLionel775 said:

And how should I initialize the seed and drop?

Oh dear... Go learn Java before D7 bans you.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted
  On 5/27/2016 at 9:13 PM, xLionel775 said:

And how should I initialize the seed and drop?

Oh dear... Go learn Java before D7 bans you.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

  • 1 month later...
Posted
  On 5/28/2016 at 4:09 PM, Draco18s said:

You could write some kind of "crop manager" class that would be able to use 1 class again.

 

Sorry for bad english:

1. Initialize your blocks (create, register, set names, models, etc)

2. Initialize your items (create, register, set names, models, etc)

 

Your Crop (do not pass seed and fruit/crop in constructor):

 

  Reveal hidden contents

 

 

The "crop manager" (my simple way to map a plant => seed, crop/fruit):

 

  Reveal hidden contents

 

 

And then (after you initialize your items and blocks):

3. Add your block, your item seed and your item fruit/crop (blocks and items will exists):

 

  Reveal hidden contents

 

Now you can create many crops-like plants using only 1 class (MyCrop class)

Making mods is fun!!!

(sorry bad english, i'm from venezuela)

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.