Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • GameREgistry.registerBlock() is @Deprecated
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
kwidem

GameREgistry.registerBlock() is @Deprecated

By kwidem, January 1, 2013 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

kwidem    0

kwidem

kwidem    0

  • Tree Puncher
  • kwidem
  • Members
  • 0
  • 3 posts
Posted January 1, 2013

And the function setBlockHarvestLevel appears not to work:

 

GameRegistry.registerBlock(BlockCop);

MinecraftForge.setBlockHarvestLevel(BlockCop, "Pickaxe", 1);

 

Yet I can mine it with wood...

  • Quote

Share this post


Link to post
Share on other sites

trulis    2

trulis

trulis    2

  • Tree Puncher
  • trulis
  • Forge Modder
  • 2
  • 33 posts
Posted January 1, 2013

Use GameRegistry.registerBlock(block, "unique block name") instead

 

This is an example from my mod.

GameRegistry.registerBlock(cobaltBlock, "blockCobalt");

 

  • Quote

Share this post


Link to post
Share on other sites

kwidem    0

kwidem

kwidem    0

  • Tree Puncher
  • kwidem
  • Members
  • 0
  • 3 posts
Posted January 2, 2013

Thanks but I can still mine with a wooden pickaxe?

Also, how would you make a block spawn naturally?

Thanks for the help so far :D

 

  • Quote

Share this post


Link to post
Share on other sites

4pwnda    1

4pwnda

4pwnda    1

  • Tree Puncher
  • 4pwnda
  • Members
  • 1
  • 14 posts
Posted January 5, 2013

It's the Material class setRequiresTool().

  • Quote

Share this post


Link to post
Share on other sites

QuantumLeaf7895    1

QuantumLeaf7895

QuantumLeaf7895    1

  • Tree Puncher
  • QuantumLeaf7895
  • Members
  • 1
  • 33 posts
Posted January 5, 2013

It's the Material class setRequiresTool().

 

I've also thought about making a block that requires a tool to harvest, but that method doesn't specify what level of tool is required, only that one is.  How does vanilla minecraft prevent ore blocks from being mined with wooden picks?  I haven't been able to find an example.

 

And what exactly does that "unique block name" in the registerBlock method do?  What does it mean, is it different from setBlockName or LanguageRegistry.addName?

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • DaemonUmbra
      Can't see anything on minecraft menu screen except for the bottom left corner

      By DaemonUmbra · Posted 22 minutes ago

      Please don't Necro old threads, if you have an issue make your own.
    • DaemonUmbra
      Forge having problem loading mods

      By DaemonUmbra · Posted 23 minutes ago

      You changed "Game Directory" to your mods folder. The Game Directory is supposed to be the folder that contains the mods folder, .minecraft by default
    • Casual
      1.12.2 crash on game start

      By Casual · Posted 27 minutes ago

      Ok to add on, had to do manual library install due to failed library install thing, also there is never another window It just closes the launcher window and then reopens it with the error.
    • Cosmic_Cookie
      Can't see anything on minecraft menu screen except for the bottom left corner

      By Cosmic_Cookie · Posted 35 minutes ago

      Hey, I have the same problem except my screen is black instead of white and this doesn't work. I know it's years later but maybe someone can help.
    • Cosmic_Cookie
      [1.12.2] Forge Crashes While Just Loading Into Loading Screen

      By Cosmic_Cookie · Posted 48 minutes ago

      Nvm wrong topic
  • Topics

    • florgonn
      4
      Can't see anything on minecraft menu screen except for the bottom left corner

      By florgonn
      Started July 30, 2014

    • SilviaX_92
      3
      Forge having problem loading mods

      By SilviaX_92
      Started 3 hours ago

    • Casual
      1
      1.12.2 crash on game start

      By Casual
      Started 51 minutes ago

    • PulseBeat_02
      14
      [1.12.2] Forge Crashes While Just Loading Into Loading Screen

      By PulseBeat_02
      Started December 13, 2018

    • GeokitFX
      1
      Minecraft Custom mod pack crashing i need help

      By GeokitFX
      Started 1 hour ago

  • Who's Online (See full list)

    • Darren Hayden
    • GatoLeyo
    • Choonster
    • Casual
    • Vorquel
    • JMAS
    • Epicmoofish
    • creepaaa
    • DaemonUmbra
    • yuusha
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • GameREgistry.registerBlock() is @Deprecated
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community