You don't want to check if the block is TALLGRASS, that only helps you against tall grass, not snow or other things.
You want to check if the block isReplaceable
You must set the registry name of an IForgeRegistryEntry with IForgeRegistryEntry#setRegistryName before registering it. For ItemBlocks, use the Block's registry name.
You want to get a random number to pass as the metadata of your egg block. To get a random number, use world.rand.nextInt(yourNumber). Replace yourNumber with a number that's one bigger than the biggest possible number you want. So if you want a random number between 0 and 3, you would replace yourNumber with 4.
*Facepalm* Whoops, I was looking at an entirely different line of code when I wrote that... I probably shouldn't try to help people at 4AM without sleep. I guess I'm taking the "Always Be Coding" motto too far...
Sorry, themistik! But, yes, as voidwalker pointed out, you've got your order of parameters mixed up; the ItemStack comes last, not first.
Everything in the net.minecraft.server.dedicated package is server-side only, so if you want to access something from there you would need a server proxy.
No, he isn't. The constructor for PotionEffect takes in a Potion, duration and then amplifier so OP is passing 500 as the duration.
Getting potions by ID though...
Should not be used. I personaly have no idea what is potion with an ID of 9. And what if it changes later? Potions should be referenced from the MobEffects class instead of their IDs.
Unlocalized names have nothing to do with registry names.
This signature doesn't look right to me. I think that the method params have a different order. Add an Override annotation to the method. If eclipse reports an error then I am correct. You should not manually write overrides, let your IDE do that for you.
You're calling Item.getItemFromBlock before you actually create and register the ItemBlocks, so it returns Items.AIR. You need to create and register the ItemBlocks in the RegistryEvent.Register<Item> handler method.
It wasn't sass at all. If your code works, you're probably doing it right. If it doesn't work, then we need to know what problems you're having before we can help you figure out what you're doing wrong.