Jump to content

[1.8]GameRegistry.findBlock always null


FLUFFY2

Recommended Posts

Hi,

 

I dont know why but GameRegistry.findBlock always gives null.

You can test this with: System.out.println(GameRegistry.findBlock("minecraft", "stone"));

This will say null, no matter what!

 

I wanted to get a block form another mod, but yeah....

 

BUT, there is a workaround since .findItem does work.

Block.getItemFromBlock(GameRegistry.findItem("minecraft", "stone"));

 

Might worth looking into it!

Thanks!

Link to comment
Share on other sites

I use it in canPlaceBlockAt().

I check wether that block is there above my block.

 

if(block == GameRegistry.findBlock("AmnesiaDecorations", "Chain"))

 

This returns null, not just here! The modid IS matching and the block registered name is the same too!

In 1.7.10 its worked fine.

Link to comment
Share on other sites

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.