Jump to content

Recommended Posts

Posted

I need a way to disable grass growth for my mod.

 

The reason for this is I need to periodically replace grass with dirt, which inevitably grows back into grass.

To my knowledge there is no event for this, and I am struggling with determining a way to do this without asm.

Posted

Which version are you using? If you're using 1.8 there's always Coarse Dirt. Unless you need actual dirt. Then I can't help you. :/

Posted

You could do Blocks.grass.setTickRandomly(false). Ofc, then it won't turn into dirt either, although if you're doing that by some other function as it appears that might not matter. Note that you might have to do this every time MC launches- I honestly don't remember if it sticks or not.

Posted

You could do Blocks.grass.setTickRandomly(false). Ofc, then it won't turn into dirt either, although if you're doing that by some other function as it appears that might not matter. Note that you might have to do this every time MC launches- I honestly don't remember if it sticks or not.

That would make all the grass blocks in the world stop ticking, and I'm not sure he wants that or not.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

You could make a custom dirt block that extends BlockDirt and behaves differently. The problem though is that Minecraft code didn't use instanceof checks (I think it should have) but instead uses instance checks (== Blocks.dirt) so your custom dirt probably won't work fully as proper dirt. I wish Minecraft code used instanceof consistently as it would give modders a lot more power -- you could extend things very easily.

 

Anyway, this might still be the way to go since you already want it to not be normal dirt.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.