Jump to content

Removing blocks from game


Ernio

Recommended Posts

So I know how to override them like Stone = MyStone, but now I want to delete one.

Is it possible without raping system (game) to remove MAJOR blocks in game, where major is ex. Ore (gold)?

If it's impossible then:

Is it possible to remove it from CretaiveTabs?

If not:

Is it possible to make sure that NOONE will get it (even on creative), only possible scenario would be typing command Give ;p

 

Also: NO ASM/Refle :D

 

EDIT: RANDOM INT rage!

Read my 3rd post.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Ok so maybe I'll take other approach: When making vanilia block replacement with my own, then if I define in MyBlockClass that it's ID is x, it will be x or it will stay vanilia?

Same goes to CreativeTabs - will they change?

 

Maybe I know how to override block, but to be honest I never used this: How exacly does it operate?

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

If you remove the block like I showed then re-add your own block in its place, vanilla will refer to your new block Im pretty sure, but be aware the next version of Forge for the latest minecraft is getting rid of block ID's so this probably won't work the same way in the next version.

Link to comment
Share on other sites

Ok, thanks, will test it :) Now new topic:

 

Next problem: When I am calling:

public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int m)

It does it server and client side.

Now when I put a Random int in it, it will be randomed 2 times (like all the other operations).

This is not a big problem, because if a method is launcher 2 times only second result is the actuall result so my random is actually single (not a pair), but can I turn it off?

Eg.:

public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int m)

have some stuff in it which will tell if at the end of mining block it should hit some value that will transform it to an bomb (lol). Now when I launch Random Int and it hit value (true) this is hat I get:

1st Random            2nd Random

true                      true                      It's cool

false                      false                      It's cool

false                      true                      }

true                      false                    } Now with last two it is making minecraft glitch :o

It sets block to bomb then it turns it again to normal, or it sets it to normal then to bomb.

As I said: It's not THAT bad, but it's confusing :C

 

 

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Stay on server side if it affects the world:

if(!world.isRemote)

 

As for block overriding, once again, it isn't good to do so.

If you want to change how a block "do things" different, there are other ways.

I can't be more specific without you telling what you want to change.

Link to comment
Share on other sites

Well, my server is not planning on changing to 1.7+ (I am 1.6.4) so IF robustus manner will work and there will be no glitches (not using other mods, so no chance for incompatibility) I will stay on this, so thanks for that.

 

As to if(!world.isRemote) - God i am retarded I forgot about it xD

 

Thanks all :) Will report with result later :D

1.7.10 is no longer supported by forge, you are on your own.

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.